<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <!-- 可选的Bootstrap主题文件（一般不用引入） -->
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

    <script type="text/javascript">
        let input;
        let max = 3;
        let ws = {};
        let host = '';
        let local = {};
        let clicks = ['login', 'enterLogout', 'autoRegSend', 'enterLogin',
            'enterBluedLogin', 'funcUserInfo', 'funcGiveGift', 'funcUserFollow',
            'funcUserUnFollow', 'funcDailySignIn', 'funcOnlineReward', 'matchStart',
            'matchStop', 'gameJoin', 'gameReady', 'gameExit', 'gameAskChip', 'gameAskDZ',
            'gameRobDZ', 'gameShowCard', 'gamePlay', 'gameMsg', 'gameAuto', 'gamePraise',
            'matchCustom', 'matchFollow', 'matchList', 'funcGoods', 'funcRecharge', 'funcMailList',
            'funcMailTake', 'funcMailTakeAll', 'funcTaskFinish', 'funcGameAmount', 'gameDouble',
            'activityChipTrade', 'activityChipBuy', 'activityChipSell', 'activitySlotMachineJoin',
            'activitySlotMachinePlay', 'activitySlotMachineDouble', 'activitySlotMachineDice',
            'activitySlotMachineReturn', 'activitySlotMachineExit', 'arenaEnter', 'arenaMatchIn', 'arenaMatchOut'];
        let inputs = ['actionList', 'funcBlock', 'gameBlock', 'activityBlock', 'arenaBlock', 'access_token',
            'login', 'name', 'enterLogout', 'loginSend', 'autoRegSend', 'bluedSend', 'userId', 'funcUserInfo',
            'funcGiveGift', 'funcUserFollow', 'funcUserUnFollow', 'funcDailySignIn', 'funcOnlineReward',
            'matchStart', 'matchStop', 'gameJoin', 'gameReady', 'gameExit', 'gameId', 'gameLv', 'praiseId', 'gamePraise',
            'matchCustom', 'matchFollow', 'matchList', 'gameAskChip', 'gameAskDZ', 'gameRobDZ', 'gameShowCard',
            'chip', 'gameMsg', 'msgId', 'askLocal', 'myCards', 'idList', 'gamePlay', 'gameAuto', 'goodsId', 'funcGoods',
            'funcRecharge', 'mailList', 'funcMailList', 'funcMailTake', 'funcMailTakeAll', 'taskList', 'funcTaskFinish',
            'funcGameAmount', 'chipId', 'chipNum', 'chipShopId', 'activityChipTrade', 'activityChipBuy', 'activityChipSell',
            'activitySlotMachineType', 'activitySlotMachineJoin', 'activitySlotMachinePlay', 'activitySlotMachineDouble',
            'activitySlotMachineDice', 'activitySlotMachineReturn', 'activitySlotMachineExit', 'arenaMode',
            'arenaEnter', 'arenaMatchIn', 'arenaMatchOut', 'gameDouble'];

        if (window.location.host == '127.0.0.1') {
            host = '120.55.171.55';
        } else {
            host = '120.55.171.55';
        }
        $(document).ready(function () {
            input = $('#div').html();
            $('#div').empty();
            $('#clear').click(function () {
                clear();
            });
            for (let i = 1; i <= max; i++) {
                html(i);
                event(i);
            }

            $(document).on('click', '.pk', function () {
                let c = $(this).data('c');
                let i = $(this).data('i');
                let s = $(this).data('selected');
                if (s) {
                    $(this).data('selected', false);
                    $(this).removeClass('bg-info');
                } else {
                    $(this).data('selected', true);
                    $(this).addClass('bg-info');
                }
                let p = [];
                $('.pc_' + i).each(function () {
                    let s = $(this).data('selected');
                    if (s) {
                        let c = $(this).data('c');
                        p.push(c);
                    }
                });
                $('#idList' + i).val(p.join(','));
            });
        });
        function card(v) {
            let c = ['黑桃', '红桃', '梅花', '方片', '无'];
            let d = [3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K', 'A', 2, '小王', '大王'];
            return c[v._color] + ":" + d[v._value];
        }
        function html(i) {
            $('#div').append(input);
            if (window.location.host == '127.0.0.1') {
                $('#account').attr('id', 'account' + i).val('dwyzlx' + (i + 5));
                $('#password').attr('id', 'password' + i).val(123456);
            } else {
                $('#account').attr('id', 'account' + i);
                $('#password').attr('id', 'password' + i);
            }
//            $('#access_token').attr('id', 'access_token' + i).val('36f71bea-59660233402b39-01902320-fda47fc');

            $('.block').attr('class', 'block' + i);

            inputs.forEach(function (name) {
                $('#' + name).attr('id', name + i);
            });
        }
        function link(i, host, port, token) {
            ws[i] = new WebSocket('ws://' + host + ':' + port);
            ws[i].onopen = function () {
                $('#on').prepend(add(i, '远程connection'));
//                console.log('客户端已连接');
                enterToken(i, token);
            };
            ws[i].onmessage = function (evt) {
                let obj = JSON.parse(evt.data);
                $('#on').prepend(add(i, evt.data));
                switch (obj.action) {
                    case 'enterLogin':
                        $('#name' + i).html(obj.data.id + ':' + obj.data.name);
                        break;
                    case 'matchGame':
                    case 'matchCustom':
                    case 'matchFollow':
                        $('#askLocal' + i).html('桌' + obj.data.local);
                        $('#askLocal' + i).parent().addClass('has-success');
                        $('#gameAuto' + i).removeClass('btn-success').removeClass('btn-danger').addClass('btn-success');
                        $('#gameAuto' + i).removeClass('gameAuto0').removeClass('gameAuto1').removeClass('gameAuto2');
                        $('#gameAuto' + i).addClass('gameAuto' + obj.data.local);
                        local[i] = parseInt(obj.data.local);
                        break;
                    case 'gamePlayer':
                        $('#praiseId' + i).empty();
                        for (let j in obj.data) {
                            let p = obj.data[j];
                            $('#praiseId' + i).append(new Option(p.name, p.id));
                        }
                        break;
                    case 'gameStart':
                    case 'gameReconnect':
                        $('#myCards' + i).empty();
                        $('#myCards' + i).append('<div>------</div>');
                        $.each(obj.data.myCards, function (k, v) {
                            let div = '<div id="p_' + v._id + '">' + v._id + ':' + card(v) + '</div>';
                            $('#myCards' + i).append(div);
                            $('#p_' + v._id).addClass('pk').addClass('pc_' + i)
                                    .data('c', v._id).data('i', i);
                        });
                        break;
                    case 'gameAskChipEnd':
                        if (local[i] == obj.data.dz) {
                            $.each(obj.data.desktopCards, function (k, v) {
                                let div = '<div id="p_' + v._id + '">' + v._id + ':' + card(v) + '</div>';
                                $('#myCards' + i).append(div);
                                $('#p_' + v._id).addClass('pk').addClass('pc_' + i)
                                        .data('c', v._id).data('i', i);
                            });
                        }
                        break;
                    case 'gamePlay':
                        $.each(obj.data.cards, function (k, v) {
                            $('#p_' + v._id).remove();
                        });
                        break;
                    case 'gameNeedReady':
                        gameReady(i);
                        break;
                    case 'gameAuto':
                        $('.gameAuto' + obj.data.local).removeClass('btn-success').removeClass('btn-danger');
                        if (obj.data.isAuto) {
                            $('.gameAuto' + obj.data.local).addClass('btn-danger');
                        } else {
                            $('.gameAuto' + obj.data.local).addClass('btn-success');
                        }
                        break;
                    case 'funcGoods':
                        $('#goodsId' + i).empty();
                        $.each(obj.data, function (k, v) {
                            $('#goodsId' + i).append(new Option(v.name, v.id));
                        });
                        break;
                    case 'funcMailList':
                        $('#mailList' + i).empty();
                        $.each(obj.data, function (k, v) {
                            $('#mailList' + i).append(new Option(v.text, v.id));
                        });
                        break;
                    case 'enterTask':
                        $('#taskList' + i).empty();
                        $.each(obj.data, function (k, v) {
                            $('#taskList' + i).append(new Option('[' + v.finish + ']' + k + ':' + v.num, k));
                        });
                        break;
                }
            };
            ws[i].onclose = function () {
                $('#on').prepend(add(i, '远程close'));
                ws[i] = null;
//                setTimeout(function () {
//                    ws[i] = null;
//                    link(i);
//                }, 1000);
            };
            ws[i].onerror = function (evt) {
            };
        }
        function clear() {
            $('#on').empty();
        }
        function add(i, msg) {
            return '<tr><td>to' + i + '</td><td>' + msg + '</td></tr>';
        }
        function event(i) {
//            link(i);
            $('#actionList' + i).change(function () {
                $('.block' + i).hide();
                let val = $(this).val();
                $('#' + val + 'Block' + i).show();
            });
            $('#actionList' + i).change();

            clicks.forEach(function (name) {
                $('#' + name + i).click(function () {
                    window[name](i);
                });
            });
        }
        function login(i) {
            let data = {};
            let ar = ['account', 'password', 'access_token'];
            $.each(ar, function (k, v) {
                if ($('#' + v + i).val()) {
                    data[v] = $('#' + v + i).val();
                }
            });
            data.expire = 7200;
            $.post('http://' + host + ':7000/login?', data, function (result) {
                if (result.code != 200) {
                    $('#on').prepend(add(i, result.msg));
                    return false;
                }
                link(i, result.host, result.port, result.token);
            }, 'json').error(function (e) {
                //alert('连接出错');
            });
        }
        function enterToken(i, token) {
            let data = {};
            data.action = 'enterToken';
            data.data = {};
            data.data.token = token;
            ws[i].send(JSON.stringify(data));
        }
        function enterLogout(i) {
            let data = {};
            data.action = 'enterLogout';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function autoRegSend(i) {
            let data = {};
            data.action = 'enterAutoReg';
            ws[i].send(JSON.stringify(data));
        }
        function enterBluedLogin(i) {
            let data = {};
            data.action = 'enterBluedLogin';
            data.data = {};
            data.data.access_token = 'eab831b0-5937d8d6d1f0e2-35373600-0347dea5';
            data.data.expire = 7200;
            ws[i].send(JSON.stringify(data));
        }
        function enterLogin(i) {
            let data = {};
            data.action = 'enterLogin';
            data.data = {};
            data.data.account = $('#account' + i).val();
            data.data.password = $('#password' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcUserInfo(i) {
            let data = {};
            data.action = 'funcUserInfo';
            data.data = {};
            data.data.id = $('#userId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcGiveGift(i) {
            let data = {};
            data.action = 'funcGiveGift';
            data.data = {};
            data.data.id = $('#userId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcUserFollow(i) {
            let data = {};
            data.action = 'funcUserFollow';
            data.data = {};
            data.data.id = $('#userId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcUserUnFollow(i) {
            let data = {};
            data.action = 'funcUserUnFollow';
            data.data = {};
            data.data.id = $('#userId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcDailySignIn(i) {
            let data = {};
            data.action = 'funcDailySignIn';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function funcOnlineReward(i) {
            let data = {};
            data.action = 'funcOnlineReward';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function matchStart(i) {
            let data = {};
            data.action = 'matchStart';
            data.data = {};
            data.data.lv = $("#gameLv" + i).val();
            data.data.showCard = true;
            ws[i].send(JSON.stringify(data));
        }
        function matchStop(i) {
            let data = {};
            data.action = 'matchStop';
            ws[i].send(JSON.stringify(data));
        }
        function gameJoin(i) {
            let data = {};
            data.action = 'gameJoin';
            ws[i].send(JSON.stringify(data));
        }
        function gameReady(i) {
            let data = {};
            data.action = 'gameReady';
            ws[i].send(JSON.stringify(data));
        }
        function gameExit(i) {
            let data = {};
            data.action = 'gameExit';
            ws[i].send(JSON.stringify(data));
        }
        function gameAskChip(i) {
            let data = {};
            data.action = 'gameAskChip';
            data.data = {};
            data.data.chip = $('#chip' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function gameAskDZ(i) {
            let data = {};
            data.action = 'gameAskDZ';
            data.data = {};
            data.data.chip = $('#chip' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function gameRobDZ(i) {
            let data = {};
            data.action = 'gameRobDZ';
            data.data = {};
            data.data.chip = $('#chip' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function gameShowCard(i) {
            let data = {};
            data.action = 'gameShowCard';
            ws[i].send(JSON.stringify(data));
        }
        function gamePlay(i) {
            let idList = [];
            if ($('#idList' + i).val()) {
                idList = $('#idList' + i).val().split(",");
            } else {

            }
            let data = {};
            data.action = 'gamePlay';
            data.data = {};
            data.data.idList = idList;
            ws[i].send(JSON.stringify(data));
        }
        function gameMsg(i) {
            let data = {};
            data.action = 'gameMsg';
            data.data = {};
            data.data.msgId = {};
            data.data.msgId.type = 1;
            data.data.msgId.id = $('#msgId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function gameDouble(i) {
            let data = {};
            data.action = 'gameDouble';
            data.data = {};
            data.data.double = $('#chip' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function gameAuto(i) {
            let data = {};
            data.action = 'gameAuto';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function gamePraise(i) {
            let data = {};
            data.action = 'gamePraise';
            data.data = {};
            data.data.target = $('#praiseId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function matchCustom(i) {
            let data = {};
            data.action = 'matchCustom';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function matchFollow(i) {
            let data = {};
            data.action = 'matchFollow';
            data.data = {};
            data.data.gameId = $('#gameId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function matchList(i) {
            let data = {};
            data.action = 'matchList';
            ws[i].send(JSON.stringify(data));
        }
        function funcGoods(i) {
            let data = {};
            data.action = 'funcGoods';
            ws[i].send(JSON.stringify(data));
        }
        function funcRecharge(i) {
            let data = {};
            data.action = 'funcRecharge';
            data.data = {};
            data.data.goodsId = $('#goodsId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcMailList(i) {
            let data = {};
            data.action = 'funcMailList';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function funcMailTake(i) {
            let data = {};
            data.action = 'funcMailTake';
            data.data = {};
            data.data.id = $('#mailList' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcMailTakeAll(i) {
            let data = {};
            data.action = 'funcMailTakeAll';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function funcTaskFinish(i) {
            let data = {};
            data.action = 'funcTaskFinish';
            data.data = {};
            data.data.taskId = $('#taskList' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function funcGameAmount(i) {
            let data = {};
            data.action = 'funcGameAmount';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function activityChipTrade(i) {
            let data = {};
            data.action = 'activityChipTrade';
            data.data = {};
            data.data.id = $('#chipShopId' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function activityChipBuy(i) {
            let data = {};
            data.action = 'activityChipBuy';
            data.data = {};
            data.data.chipId = 300001;
            data.data.num = $('#chipNum' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function activityChipSell(i) {
            let data = {};
            data.action = 'activityChipSell';
            data.data = {};
            data.data.chipId = 300001;
            data.data.num = $('#chipNum' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function activitySlotMachineJoin(i) {
            let data = {};
            data.action = 'activitySlotMachineJoin';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function activitySlotMachinePlay(i) {
            let data = {};
            data.action = 'activitySlotMachinePlay';
            data.data = {};
            data.data[1] = 2;
            data.data[2] = 3;
            data.data[3] = 1;
            ws[i].send(JSON.stringify(data));
        }
        function activitySlotMachineDouble(i) {
            let data = {};
            data.action = 'activitySlotMachineDouble';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function activitySlotMachineDice(i) {
            let data = {};
            data.action = 'activitySlotMachineDice';
            data.data = {};
            data.data.key = $('#activitySlotMachineType' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function activitySlotMachineReturn(i) {
            let data = {};
            data.action = 'activitySlotMachineReturn';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function activitySlotMachineExit(i) {
            let data = {};
            data.action = 'activitySlotMachineExit';
            data.data = {};
            ws[i].send(JSON.stringify(data));
        }
        function arenaEnter(i) {
            let data = {};
            data.action = 'arenaEnter';
            data.data = {};
            data.data.mode = $('#arenaMode' + i).val();
            ws[i].send(JSON.stringify(data));
        }
        function arenaMatchIn(i) {
            let data = {};
            data.action = 'arenaMatchIn';
            ws[i].send(JSON.stringify(data));
        }
        function arenaMatchOut(i) {
            let data = {};
            data.action = 'arenaMatchOut';
            ws[i].send(JSON.stringify(data));
        }
    </script>
</head>
<body>
<div class="container">
    <div class="form-group col-xs-12">
        <div style="overflow: auto; max-height: 300px;">
            <table class="table table-striped">
                <tbody id="on"></tbody>
            </table>
        </div>
    </div>
    <!--<div id="on1" class="form-group col-xs-4"></div>-->
    <!--<div id="on2" class="form-group col-xs-4"></div>-->
    <!--<div id="on3" class="form-group col-xs-4"></div>-->
    <div class="form-group col-xs-12">
        <button id="clear" type="button" class="btn btn-default btn-block">清空</button>
    </div>
    <div class="form-group"></div>
    <div id="div">
        <div class="form-group col-xs-4">
            <input id="account" type="text" class="form-control input-sm" placeholder="账号">
            <input id="password" type="password" class="form-control input-sm" placeholder="密码">
            <input id="access_token" type="text" class="form-control input-sm" placeholder="access_token">
            <button id="login" type="button" class="btn btn-default btn-sm">登录</button>
            <button id="enterLogout" type="button" class="btn btn-default btn-sm">登出</button>
            <button id="funcDailySignIn" type="button" class="btn btn-default btn-sm">签到</button>
            <button id="funcOnlineReward" type="button" class="btn btn-default btn-sm">礼品</button>
            <div class="form-group"></div>
            <div class="input-group">
                <span class="input-group-addon">功能</span>
                <select id="actionList" class="form-control input-sm">
                    <option value="game">游戏相关</option>
                    <option value="func">功能相关</option>
                    <option value="activity">活动相关</option>
                    <option value="arena">比赛相关</option>
                </select>
            </div>
            <div class="form-group"></div>
            <div id="name" class="form-group">111</div>
            <div id="funcBlock" class="block">
                <div class="input-group">
                    <div class="input-group-btn">
                        <button id="funcMailList" type="button" class="btn btn-default btn-sm">邮件</button>
                    </div>
                    <select id="mailList" class="form-control input-sm"></select>
                    <div class="input-group-btn">
                        <button id="funcMailTake" type="button" class="btn btn-default btn-sm">领取</button>
                        <button id="funcMailTakeAll" type="button" class="btn btn-default btn-sm">全领</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <input id="userId" class="form-control input-sm" value="">
                    <div class="input-group-btn">
                        <button id="funcUserInfo" type="button" class="btn btn-default btn-sm">查询</button>
                        <button id="funcGiveGift" type="button" class="btn btn-default btn-sm">送礼</button>
                        <button id="funcUserFollow" type="button" class="btn btn-default btn-sm">关注</button>
                        <button id="funcUserUnFollow" type="button" class="btn btn-default btn-sm">取关</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <select id="taskList" class="form-control input-sm"></select>
                    <div class="input-group-btn">
                        <button id="funcTaskFinish" type="button" class="btn btn-default btn-sm">完成</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <div class="input-group-btn">
                        <button id="funcGoods" type="button" class="btn btn-default btn-sm">充值</button>
                    </div>
                </div>
            </div>
            <div id="activityBlock" class="block">
                <div class="input-group">
                    <!--<input id="chipNum" class="form-control input-sm" value="">-->
                    <select id="chipShopId" class="form-control input-sm">
                        <option value="1">用金币买1代币</option>
                        <option value="2">用金币买10代币</option>
                        <option value="3">用金币买50代币</option>
                        <option value="7">用代币买90金币</option>
                        <option value="8">用代币买900金币</option>
                        <option value="9">用代币买4500金币</option>
                    </select>
                    <div class="input-group-btn">
                        <button id="activityChipTrade" type="button" class="btn btn-default btn-sm">兑换</button>
                        <button id="activityChipBuy" type="button" class="btn btn-default btn-sm">购入</button>
                        <button id="activityChipSell" type="button" class="btn btn-default btn-sm">出售</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <select id="activitySlotMachineType" class="form-control input-sm">
                        <option value="a">小</option>
                        <option value="b">大</option>
                    </select>
                    <div class="input-group-btn">
                        <button id="activitySlotMachineJoin" type="button" class="btn btn-default btn-sm">进</button>
                        <button id="activitySlotMachinePlay" type="button" class="btn btn-default btn-sm">始</button>
                        <button id="activitySlotMachineDouble" type="button" class="btn btn-default btn-sm">倍</button>
                        <button id="activitySlotMachineDice" type="button" class="btn btn-default btn-sm">骰</button>
                        <button id="activitySlotMachineReturn" type="button" class="btn btn-default btn-sm">收</button>
                        <button id="activitySlotMachineExit" type="button" class="btn btn-default btn-sm">退</button>
                    </div>
                </div>
            </div>
            <div id="gameBlock" class="block">
                <div class="input-group">
                    <span class="input-group-addon">比赛</span>
                    <select id="arenaMode" class="form-control input-sm">
                        <option value="1">赛1</option>
                        <option value="2">赛2</option>
                    </select>
                    <div class="input-group-btn">
                        <button id="arenaEnter" type="button" class="btn btn-default btn-sm">进入</button>
                        <button id="arenaMatchIn" type="button" class="btn btn-default btn-sm">准备</button>
                        <button id="arenaMatchOut" type="button" class="btn btn-default btn-sm">取消</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <select id="gameLv" class="form-control input-sm">
                        <!--<option value="1">新手，100-10000</option>-->
                        <!--<option value="2">初级，1000-30000</option>-->
                        <option value="6">欢乐</option>
                        <option value="3">普通，30000+</option>
                        <option value="4">中级，80000+</option>
                        <option value="5">高级，200000+</option>
                        <!--<option value="6">顶级，500000+</option>-->
                    </select>
                    <div class="input-group-btn">
                        <button id="matchStart" type="button" class="btn btn-default btn-sm">排队</button>
                        <button id="matchStop" type="button" class="btn btn-default btn-sm">停止</button>
                        <button id="funcGameAmount" type="button" class="btn btn-default btn-sm">游戏</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <!--<span class="input-group-addon">游戏</span>-->
                    <input id="gameId" class="form-control input-sm" value="">
                    <div class="input-group-btn">
                        <button id="matchCustom" type="button" class="btn btn-default btn-sm">开房</button>
                        <button id="matchList" type="button" class="btn btn-default btn-sm">列表</button>
                        <button id="matchFollow" type="button" class="btn btn-default btn-sm">跟进</button>
                        <button id="gameJoin" type="button" class="btn btn-default btn-sm">加入</button>
                        <button id="gameExit" type="button" class="btn btn-default btn-sm">离开</button>
                        <!--<button id="gameReady" type="button" class="btn btn-default btn-sm">准备</button>-->
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <span class="input-group-addon" id="askLocal">桌</span>
                    <select id="chip" class="form-control input-sm">
                        <option value="0">不</option>
                        <option value="1">1分</option>
                        <option value="2">2分</option>
                        <option value="3">3分</option>
                    </select>

                    <div class="input-group-btn">
                        <button id="gameAskChip" type="button" class="btn btn-default btn-sm" title="叫分">叫</button>
                        <button id="gameAskDZ" type="button" class="btn btn-default btn-sm" title="叫地主">地</button>
                        <button id="gameRobDZ" type="button" class="btn btn-default btn-sm" title="抢地主">抢</button>
                        <button id="gameShowCard" type="button" class="btn btn-default btn-sm" title="明牌">明</button>
                        <button id="gameDouble" type="button" class="btn btn-default btn-sm" title="加倍">倍</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <select id="msgId" class="form-control input-sm">
                        <option value="1">1号消息</option>
                        <option value="2">2号消息</option>
                        <option value="3">3号消息</option>
                    </select>
                    <div class="input-group-btn">
                        <button id="gameMsg" type="button" class="btn btn-default btn-sm">消息</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div id="myCards" class="form-group" style="max-height: 200px; overflow: auto;">
                </div>
                <div class="input-group">
                    <div class="input-group-btn">
                        <button id="gameAuto" type="button" class="btn btn-success btn-sm">托管</button>
                    </div>
                    <input id="idList" class="form-control input-sm">
                    <div class="input-group-btn">
                        <button id="gamePlay" type="button" class="btn btn-default btn-sm">出牌</button>
                    </div>
                </div>
                <div class="form-group"></div>
                <div class="input-group">
                    <select id="praiseId" class="form-control input-sm">
                    </select>
                    <div class="input-group-btn">
                        <button id="gamePraise" type="button" class="btn btn-default btn-sm">点赞</button>
                    </div>
                </div>
            </div>
            <div id="arenaBlock" class="block">
            </div>
        </div>
    </div>
</div>
</body>
</html>